﻿using System.IO;
using visinia.SmartEngine.Providers;

namespace visinia.SmartEngine.Installer
{
    public class InstallerCommon
    {
        #region Plugin Install
        public static bool ExecuteScript(string ScriptFile)
        {
            using (StreamReader sreader = File.OpenText(ScriptFile))
            {
                string script = sreader.ReadToEnd();
                return SmartEngineDataProvider.Provider.ExecuteScript(script);                
            }            
        }        
        #endregion
    }
}
